package day31_other;


import java.util.ArrayList;
import java.util.List;
import java.util.TreeMap;

/**
 * @ClassName Solution
 * @Description
 * @Author clockTown
 * @Date 2021/6/9 19:13
 * @Version 1.0
 */
public class Solution {

    private int[] sortedNums;


    public int solve(int[] nums) {

        return 0;
    }

    private void merge(){

    }

    private void mergeSort(int[] nums, int start, int end){
        if (start >= end){
            return;
        }
        int mid = (end + start) >> 1;
        int start1 = start, end1 = mid;
        int start2 = mid + 1, end2 = end;
        mergeSort(nums, start1, end1);
        mergeSort(nums, start2, end2);
        int k = start;
        while (start1 <= end1 && start2 <= end2){
            sortedNums[k++] = (nums[start1] < nums[start2]) ? nums[start1++] : nums[start2++];
        }
        while (start1 <= end1){
            sortedNums[k++] = nums[start1++];
        }
        while (start2 <= end2){
            sortedNums[k++] = nums[start2++];
        }
        for (int i = 0; i < end; i++) {
            nums[i] = sortedNums[i];
        }

    }
}

